import Vue from 'vue'
import VueRouter, { RouteConfig } from 'vue-router'
import ManageAside from "@/components/ManageAside.vue";
Vue.use(VueRouter)

const routes: Array<RouteConfig> = [
  {
    path: '/',
    name: 'ManageView',
    component: () => import('../views/ManageView.vue'),
    redirect:"/DemoUpload",
    children:[
      {
        path: 'UserManage',name: 'UserManage',component: () => import('../views/UserManage.vue'),
      }
    ]
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path: '/DemoUpload',
    name: 'DemoUpload',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/DemoUpload.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
